﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Lidgren.Network;

namespace GameServer
{
    public partial class BanKickWindow : Form
    {
        public BanKickWindow(int type, string player)//type=0 ban, 1 - kick, 2 - message
        {
            InitializeComponent();
            if (type == 1)
            {
                label2.Visible = false;
                dateTp.Visible = false;
                this.Height = Height - 20;
                this.Text = "Кик игрока " + player;
            }
            else if (type == 0)
            {
                Text = "Бан игрока " + player;
            }
            else if (type == 2)
            {
                label2.Visible = false;
                dateTp.Visible = false;
                label1.Text = "Сообщение:";
                this.Height = Height - 20;
                this.Text = "Сообщение игроку " + player;
            }
        }

        public string Reason
        {
            get { return reasonTb.Text; }
        }

        public DateTime Date
        {
            get { return dateTp.Value; }
        }
        private void cancelBtn_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void okBtn_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
